"""
@Time ： 2021/10/19 20:34
@Auth ： ChenZhangKun
"""


class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print("%s会吃饭" % self.name)


class Dog(Animal):

    def shout(self):
        print("%s会犬吠" % self.name)


class XiaoTian(Dog):
    def fly(self):
        print("%s会飞" % self.name)

    # 重写父类方法
    def shout(self):
        print("%s会在天上叫" % self.name)


dog = XiaoTian("哮天犬")
dog.shout()
